// feedback.js
Page({
  data: {
    name: '',
    contact: '',
    feedback: ''
  },
  bindNameInput(e) {
    this.setData({
      name: e.detail.value
    });
  },
  bindContactInput(e) {
    this.setData({
      contact: e.detail.value
    });
  },
  bindFeedbackInput(e) {
    this.setData({
      feedback: e.detail.value
    });
  },
  submitFeedback() {
    const { name, contact, feedback } = this.data;
    // 在这里添加提交反馈的代码，比如发送到服务器
    console.log('提交的反馈:', { name, contact, feedback });
    // 提示用户反馈已提交
    wx.showToast({
      title: '反馈已提交',
      icon: 'success',
      duration: 2000
    });
    this.setData({
      name:"",
      contact:"",
      feedback:""
    })
    setTimeout(function(){
      wx.navigateBack()
    },1000)
  }
});
